package com.shopping.service.impl;

import java.util.List;
import java.util.Map;

import com.shopping.bean.Goods;
import com.shopping.bean.ShopCar;
import com.shopping.dao.ShopCarDao;
import com.shopping.dao.impl.ShopCarDaoImpl;
import com.shopping.service.ShopCarService;

public class ShopCarServiceImpl implements ShopCarService {

	ShopCarDao shopCarDao = new ShopCarDaoImpl();
	
	@Override
	public Goods getShopCarGoods(int goodsId) {
		return shopCarDao.selectGoodsByGoodsId(goodsId);
	}

	@Override
	public int getUserNum(int userId) {
		return shopCarDao.selectUserNum(userId);
	}

	@Override
	public List<Goods> getGoodsId(int userId) {
		return shopCarDao.selectGoodsId(userId);
	}

	@Override
	public int delGoods(Map<String, String[]> condition) {
		return shopCarDao.delGoods(condition);
	}

	@Override
	public List<ShopCar> getShopCar(int userId) {
		return shopCarDao.selectShopCar(userId);
	}

	@Override
	public int deleteGoods(int userId, int goodsId) {
		return shopCarDao.deleteGoods(userId, goodsId);
	}

	@Override
	public ShopCar selectShopCarGoods(int goodsId,int userId) {
		return shopCarDao.selectShopCarGoods(goodsId,userId);
	}

}
